<template>
  <!-- 作业票审查 经办 -->
  <view v-if="isEmpty"><empty></empty></view>
  <view v-else>
    <view class="cu-card-wrap" v-for="(item, index) in listData" :key="item.nodeTaskId">
      <view class="header-wrap">
        <view class="title-wrap">
          <text class="title">{{ item.ticketCode }}</text>
        </view>
      </view>
      <view class="affix">
        <image
          class="affix-icon"
          :src="`/static/images/ticket-type/work-type-${item.workTypeFlag}.png`"
          mode="aspectFit"
        />
      </view>
      <view class="body-wrap">
        <view class="content-wrap">
          <view class="label">作业项目：</view>
          <view class="value">{{ item.projectName }}</view>
        </view>
        <view class="content-wrap">
          <view class="label">项目编号：</view>
          <view class="value">{{ item.projectCode }}</view>
        </view>
        <view class="content-wrap">
          <view class="label">作业地点：</view>
          <view class="value">{{ item.workPoint }}</view>
        </view>
        <view class="content-wrap">
          <view class="label">作业内容：</view>
          <view class="value">{{ item.workContent }}</view>
        </view>
        <view class="content-wrap">
          <view class="label">作业级别：</view>
          <view class="value">
            <view v-if="item.ticketWorkLevel" :class="styleSelector(item.ticketWorkLevel)">{{
              item.ticketWorkLevelLabel
            }}</view>
            <view v-else>--</view>
          </view>
        </view>
        <view class="content-wrap">
          <view class="label">作业负责人：</view>
          <view class="value">{{ item.directorName }}</view>
        </view>
        <view class="content-wrap">
          <view class="label">处理节点：</view>
          <view class="value">{{ item.ticketNodeName }}</view>
        </view>
        <view class="content-wrap">
          <view class="label">当前节点：</view>
          <view class="value">{{ item.currentNodeTypes }}</view>
        </view>
        <view class="content-wrap">
          <view class="label">当前处理人：</view>
          <view class="value">{{ item.currentNodeUsers }}</view>
        </view>
      </view>
      <view class="footer-wrap">
        <view class="content-wrap"></view>
        <view class="button-wrap"
          ><navigator :url="`/pages/jobSlip/detail/index?ticketId=${item.ticketId}`" class="button"
            >查看</navigator
          ></view
        >
      </view>
    </view>
  </view>
</template>

<script>
import checkMixin from '../checkMixin.js'
import Empty from '@/components/cu-empty/index.vue'
export default {
  mixins: [checkMixin],
  components: {
    Empty
  },
  data() {
    return {
      listType: '2'
    }
  }
}
</script>

<style lang="scss" scoped>
.affix {
  //width: 90px;
  height: 30px;
  position: absolute;
  top: 0;
  right: 0;
}

uni-image.affix-icon {
  height: 30px !important;
  width: 78px !important;
}
.cu-card-wrap {
  margin-bottom: 24rpx;
  position: relative;
}
</style>
